<!DOCTYPE html>
<html>
	<head>
		<title>售后申请审核</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<!-- 所有的 css & js 资源 -->
		<link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
		<link rel="stylesheet" href="../../static/sa.css"> 
		<script src="../../static/vue.min.js"></script>
		<script src="../../static/kj/element-ui/index.js"></script>
		<script src="../../static/jquery.min.js"></script>
		<script src="../../static/kj/layer/layer.js"></script>
		<script src="../../static/sa.js"></script>
		<script src="../../sa-resources/router.js"></script>
	</head>
	<body>
		<div class="vue-box" style="display: none;" :style="'display: block;'">
			<!-- 参数栏 -->
			<div class="c-panel">
				<div class="c-title">售后申请单:{{m.apply_bn}}</div>
				<el-form v-if="m">
					<div class="c-item br">
						<label class="c-label">审核操作：</label>
						<el-select
							size="small"
							v-model="s.state"
						    default-first-option
						    placeholder="请选择审核意见">
							<el-option label="审核通过" value="APPROVED"></el-option>
							<el-option label="审核拒绝" value="REFUSED"></el-option>
						  </el-select>
					</div>
					<div class="c-item br">
						<label class="c-label">审核意见：</label>
						<el-input size="mini" v-model="s.audit_opinion"></el-input>
					</div>
					<div class="c-item br">
						<label class="c-label"></label>
						<el-button size="mini" type="primary" icon="el-icon-plus" size="mini" @click="ok">确定</el-button>
					</div>
				</el-form>
			</div>
		</div>
		<script type="text/javascript">
			new Vue({
				el: '.vue-box',
				data: {
					id: sa.p('id', 0),
					m: {},
					s: {
						state: 'APPROVED',
						audit_opinion: '',
						apply_id: sa.p('id', 0)
					},
					companyList: []
				},
				methods: {
					// 创建一个 默认Model
					createModel: function() {
						return {
							is_active: 1,
							tag_type: 'GOODS'
						};
					},
					// ok
					ok: function() {
						sa.ajax(router.auditApply, this.s, function(res){
							sa.alert('操作成功', function(res) {
								sa.closeCurrIframe(); // 关闭本页
								parent.window.location.reload();
							}.bind(this)); 
						}.bind(this));
					}
				},
				mounted: function(){
				}
			})
		</script>
	</body>
</html>